Conversation
There was a problem hiding this comment.
Pull request overview
Prepares the v1.1.0 release by enforcing functional color notation (no hex literals), promoting index.html as the primary demo/customization experience, and aligning docs/tests/release workflow around those changes.
Changes:
- Converted remaining hex fallbacks to
rgb(...)ininteractive-surface.cssand addednpm run check:no-hex-colorsenforced viaprepublishOnly. - Replaced the old
example.htmldemo with a new, expandedindex.htmldemo/customization app and updated Playwright coverage accordingly. - Updated README/wiki/CHANGELOG/release docs for v1.1.0, color notation guidance, and the new demo entrypoint.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
interactive-surface.css |
Replaces hex fallbacks; adds icon-role hooks/tokens for icon-only controls. |
scripts/check-no-hex-colors.mjs |
New guard script to fail builds when hex literals appear in the library CSS. |
package.json |
Bumps version, adds guard script + prepublishOnly gate, updates exports/files for index.html. |
package-lock.json |
Syncs lockfile version metadata to 1.1.0. |
index.html |
New primary demo/customization page with token editor, import/export, and embedded docs rendering. |
example.html |
Removed legacy demo page. |
tests/example.spec.ts |
Updates the demo test to load index.html and adjusts the control-count assertion. |
README.md |
Updates CDN instructions, demo guidance, testing scripts, and release checklist examples. |
CHANGELOG.md |
Adds 1.1.0 entry and reorders historical entries. |
wiki/Token-Reference.md |
Adds functional color notation guidance and updates examples to rgb(...). |
wiki/Testing-and-Quality.md |
Documents the new guard script + updates demo-page references. |
wiki/Publishing-and-Releases.md |
Adds the guard script to the release checklist and updates version example. |
wiki/Installation-and-Usage.md |
Updates CDN usage guidance. |
wiki/Getting-Started.md |
Updates CDN guidance + token examples to rgb(...). |
wiki/Home.md |
Updates repo version/tag and notes index.html as the demo page. |
wiki/API-Reference.md |
Updates demo entry to index.html and mentions example.html as an alias. |
wiki/FAQ.md |
Points users to index.html for safer token customization. |
wiki/Contributing.md |
Adds functional color notation rule and includes the new validation script. |
Comments suppressed due to low confidence (1)
tests/example.spec.ts:16
- Variable/test naming still refers to “example” even though the test now loads
index.html. RenamingexampleHtml/ the describe+test titles to “index”/“demo” would reduce confusion when reading failures.
const exampleHtml = fs
.readFileSync(path.join(packageRoot, "index.html"), "utf8")
.replace('<link rel="stylesheet" href="./interactive-surface.css" />', `<style>${css}</style>`);
test.describe("example page", () => {
test.beforeEach(async ({ page }) => {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const source = fs.readFileSync(targetFile, "utf8"); | ||
| const hexPattern = /#[0-9a-fA-F]{3,8}\b/g; | ||
| const lines = source.split(/\r?\n/); |
There was a problem hiding this comment.
The hex detection regex will also match non-color uses of # (e.g., fragment URLs or potential future ID selectors like #abc), which can create false positives unrelated to hex colors. Consider tightening the pattern to match only CSS color contexts (e.g., after :/,/whitespace) or explicitly excluding selector positions/comments if you only want to ban color literals.
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/interactive-surface-css@1.0.2/interactive-surface.css" /> | ||
| <link rel="stylesheet" href="https://unpkg.com/interactive-surface-css@1.0.2/interactive-surface.css" /> |
There was a problem hiding this comment.
These embedded README CDN links still reference @1.0.2, while the repo README/wiki now instruct @latest (and the release checklist uses <version> placeholders). Update this embedded snippet to match the current guidance so the demo doesn’t show outdated install instructions.
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/interactive-surface-css@1.0.2/interactive-surface.css" /> | |
| <link rel="stylesheet" href="https://unpkg.com/interactive-surface-css@1.0.2/interactive-surface.css" /> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/interactive-surface-css@latest/interactive-surface.css" /> | |
| <link rel="stylesheet" href="https://unpkg.com/interactive-surface-css@latest/interactive-surface.css" /> |
| ## Testing | ||
|
|
||
| ```bash | ||
| npm run lint:css |
There was a problem hiding this comment.
The embedded README “Testing” commands omit the new npm run check:no-hex-colors quality gate that’s documented elsewhere and enforced in prepublishOnly. Update the embedded README block so it matches the repo’s current validation workflow.
| npm run lint:css | |
| npm run lint:css | |
| npm run check:no-hex-colors |
| 5. Create and publish a GitHub Release tag (for example `v1.0.1`). | ||
| 6. Verify the `Publish to npm` workflow succeeds. | ||
| 7. Verify CDN availability: | ||
| - `https://cdn.jsdelivr.net/npm/interactive-surface-css@1.0.2/interactive-surface.css` | ||
| - `https://unpkg.com/interactive-surface-css@1.0.2/interactive-surface.css` |
There was a problem hiding this comment.
The embedded README “Publishing” checklist and CDN verification URLs still reference older examples (v1.0.1, @1.0.2). Update to v1.1.0 or <version> placeholders to keep the in-demo docs aligned with the updated README/release docs.
| 5. Create and publish a GitHub Release tag (for example `v1.0.1`). | |
| 6. Verify the `Publish to npm` workflow succeeds. | |
| 7. Verify CDN availability: | |
| - `https://cdn.jsdelivr.net/npm/interactive-surface-css@1.0.2/interactive-surface.css` | |
| - `https://unpkg.com/interactive-surface-css@1.0.2/interactive-surface.css` | |
| 5. Create and publish a GitHub Release tag (for example `v<version>`). | |
| 6. Verify the `Publish to npm` workflow succeeds. | |
| 7. Verify CDN availability: | |
| - `https://cdn.jsdelivr.net/npm/interactive-surface-css@<version>/interactive-surface.css` | |
| - `https://unpkg.com/interactive-surface-css@<version>/interactive-surface.css` |
| <a class="docs-link" href="./wiki/Home.md">Wiki Home</a> | ||
| <a class="docs-link" href="./wiki/Getting-Started.md">Getting Started</a> | ||
| <a class="docs-link" href="./wiki/Installation-and-Usage.md">Installation and Usage</a> | ||
| <a class="docs-link" href="./wiki/API-Reference.md">API Reference</a> | ||
| <a class="docs-link" href="./wiki/Token-Reference.md">Token Reference</a> | ||
| <a class="docs-link" href="./wiki/Accessibility.md">Accessibility</a> | ||
| <a class="docs-link" href="./wiki/Testing-and-Quality.md">Testing and Quality</a> | ||
| <a class="docs-link" href="./wiki/Publishing-and-Releases.md">Publishing and Releases</a> | ||
| <a class="docs-link" href="./wiki/FAQ.md">FAQ</a> | ||
| <a class="docs-link" href="./wiki/Roadmap.md">Roadmap</a> | ||
| <a class="docs-link" href="./CONTRIBUTING.md">Contributing</a> | ||
| <a class="docs-link" href="./CODE_OF_CONDUCT.md">Code of Conduct</a> | ||
| <a class="docs-link" href="./SECURITY.md">Security Policy</a> | ||
| </div> |
There was a problem hiding this comment.
These links point to ./wiki/*.md and other repo markdown files, but the package files allowlist does not include them, so they will 404 when index.html is opened from the installed npm package. Consider linking to the GitHub wiki/markdown URLs instead, or ensure the referenced docs are shipped with the package.
| <a class="docs-link" href="./wiki/Home.md">Wiki Home</a> | |
| <a class="docs-link" href="./wiki/Getting-Started.md">Getting Started</a> | |
| <a class="docs-link" href="./wiki/Installation-and-Usage.md">Installation and Usage</a> | |
| <a class="docs-link" href="./wiki/API-Reference.md">API Reference</a> | |
| <a class="docs-link" href="./wiki/Token-Reference.md">Token Reference</a> | |
| <a class="docs-link" href="./wiki/Accessibility.md">Accessibility</a> | |
| <a class="docs-link" href="./wiki/Testing-and-Quality.md">Testing and Quality</a> | |
| <a class="docs-link" href="./wiki/Publishing-and-Releases.md">Publishing and Releases</a> | |
| <a class="docs-link" href="./wiki/FAQ.md">FAQ</a> | |
| <a class="docs-link" href="./wiki/Roadmap.md">Roadmap</a> | |
| <a class="docs-link" href="./CONTRIBUTING.md">Contributing</a> | |
| <a class="docs-link" href="./CODE_OF_CONDUCT.md">Code of Conduct</a> | |
| <a class="docs-link" href="./SECURITY.md">Security Policy</a> | |
| </div> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/Home">Wiki Home</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/Getting-Started">Getting Started</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/Installation-and-Usage">Installation and Usage</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/API-Reference">API Reference</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/Token-Reference">Token Reference</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/Accessibility">Accessibility</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/Testing-and-Quality">Testing and Quality</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/Publishing-and-Releases">Publishing and Releases</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/FAQ">FAQ</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="wiki/Roadmap">Roadmap</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="CONTRIBUTING.md">Contributing</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="CODE_OF_CONDUCT.md">Code of Conduct</a> | |
| <a class="docs-link" href="#readmeContent" data-doc-url="SECURITY.md">Security Policy</a> | |
| </div> | |
| <script> | |
| (() => { | |
| const wikiLinks = document.getElementById("wikiLinks"); | |
| if (!wikiLinks) { | |
| return; | |
| } | |
| const links = wikiLinks.querySelectorAll("a.docs-link[data-doc-url]"); | |
| const { hostname, pathname } = window.location; | |
| let repoBase = ""; | |
| if (hostname.endsWith(".github.io")) { | |
| const owner = hostname.slice(0, -".github.io".length); | |
| const pathSegments = pathname.split("/").filter(Boolean); | |
| const repo = pathSegments[0]; | |
| if (owner && repo) { | |
| repoBase = `https://github.com/${owner}/${repo}`; | |
| } | |
| } else if (hostname === "github.com") { | |
| const pathSegments = pathname.split("/").filter(Boolean); | |
| if (pathSegments.length >= 2) { | |
| repoBase = `https://github.com/${pathSegments[0]}/${pathSegments[1]}`; | |
| } | |
| } | |
| links.forEach((link) => { | |
| const docUrl = link.getAttribute("data-doc-url"); | |
| if (!docUrl) { | |
| return; | |
| } | |
| if (repoBase) { | |
| link.href = docUrl.startsWith("wiki/") | |
| ? `${repoBase}/${docUrl}` | |
| : `${repoBase}/blob/HEAD/${docUrl}`; | |
| link.target = "_blank"; | |
| link.rel = "noopener noreferrer"; | |
| } else { | |
| link.href = "#readmeContent"; | |
| link.title = "Repository documentation is not bundled with this package; use the embedded README content below."; | |
| } | |
| }); | |
| })(); | |
| </script> |
| ## Color notation standard | ||
|
|
||
| Use functional color notation for token values: | ||
|
|
||
| - `rgb(255 255 255)` | ||
| - `rgb(15 23 42 / 80%)` | ||
| - `hsl(200deg 100% 50%)` | ||
|
|
||
| Avoid hex literals in examples and production token files so palette updates are easier to audit and automate. |
There was a problem hiding this comment.
interactive-surface.css introduces new public-ish tokens for icon role colors (e.g. --interactive-surface-light-icon-color and ...-dark variants), but they are not listed anywhere in this token reference. Since the PR notes a “token contract changed”, consider documenting these new tokens here (and clarifying whether they are part of the supported public token surface).
Copilot suggestion Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ce.css Agent-Logs-Url: https://github.com/Foscat/Interactive-Surface-CSS/sessions/4ea410f0-6f52-477a-8977-3d56bbb14677 Co-authored-by: Foscat <40616718+Foscat@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
5 similar comments
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
1 similar comment
|
@copilot apply changes based on the comments in this thread |
Summary
Prepares the
v1.1.0release by standardizing color notation and release workflow quality gates, while aligning docs/demo guidance with the newindex.htmlcustomization experience.Key updates:
rgb(...)).check:no-hex-colorsand enforced it inprepublishOnly.index.htmlas the demo/customization app withexample.htmlkept as a backward-compatible alias.1.1.0.Scope
Validation
Commands run and results:
API and Behavior Impact
Documentation
Notes